package com.project.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bean.ThingBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;

/**
 * @author RJ
 * @date 2022/9/15 9:04
 */
@Repository
public interface IThingDao extends BaseMapper<ThingBean> {
    ThingBean getThingInfo(Integer thingId);

    void updThing(@Param("thingId") Integer thingId, @Param("thingStage") String thingStage, @Param("thingScheme") String thingScheme);

    IPage<ThingBean> cutThingByItem(Page<ThingBean> page, @Param("thingName") String thingName, @Param("thingStage") String thingStage,
                                    @Param("areaName") String areaName, @Param("start") LocalDate startDate, @Param("end") LocalDate endDate);

    void updStage(@Param("thingId") Integer thingId, @Param("thingStage") String thingStage);
}
